package com.bifrost.web.controller;

import com.bifrost.common.model.ResultModel;
import com.bifrost.model.sap.Report;
import com.bifrost.service.TransactionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Author by yanxiaobo
 * Date on 2018/5/21$.
 */
@Api("小票相关接口")
@RestController
@RequestMapping("/transaction")
public class TransactionController {
    @Autowired
    TransactionService transactionService;

    /*@ApiOperation(value = "获取小票")
    @RequestMapping(value = "/list",method = RequestMethod.GET)
    public ResultModel send() {
        List<String> transactionList = transactionService.list();

        Map<String,Object> map = new HashMap<>();
        map.put("data",transactionList);

        return ResultModel.ok(map);
    }

    @ApiOperation(value = "获取应收应缴报表数据")
    @RequestMapping(value = "/report/list",method = RequestMethod.GET)
    public ResultModel report() {
        List<Report> reportList = transactionService.getReports();

        Map<String,Object> map = new HashMap<>();
        map.put("data",reportList);

        return ResultModel.ok(map);
    }*/

}
